﻿#if UNITY_EDITOR
using UnityEditor;
/// <summary>
/// 编辑器菜单_Project菜单
/// </summary>
public partial class ESF_MenuItem_Project : AbsESF_EditorMenuItem
{
    #region 常量
    /// <summary>
    /// 菜单名称
    /// </summary>
    const string mcDevMenuName = "Project/";
    /// <summary>
    /// 菜单
    /// </summary>
    const string mcDevMenuRoot = cDevMenuRootPath + mcDevMenuName;
    /// <summary>
    /// Asset菜单
    /// </summary>
    const string mcDevAssetMenu = cDevMenuAssetPath + mcDevMenuName;
    /// <summary>
    /// Hierarchy菜单
    /// </summary>
    const string mcDevHierarchy = cDevMenuHierarchyPath + mcDevMenuName;
    /// <summary>
    /// 菜单优先级
    /// </summary>
    const int mcPriority = 100 * ESF_MenuPriorityConst.Project;
    #endregion

    #region ProjectSetting
    const string mcProjectSetting = "Project Setting";
    /// <summary>
    /// 工程设定
    /// </summary>
    [MenuItem(mcDevMenuRoot + mcProjectSetting, false, mcPriority)]
    [MenuItem(mcDevAssetMenu + mcProjectSetting, false, mcPriority)]
    [MenuItem(mcDevHierarchy + mcProjectSetting, false, mcPriority)]
    static void ESF_MenuItem_ProjectSetting()
    {
        EditorWindow_ProjectSetting window = EditorWindow.GetWindow<EditorWindow_ProjectSetting>(mcProjectSetting);
        window.Show();
    }
    #endregion

    #region Build ResxTemplete Enum
    const string mcBuildResxTempleteEnum = "Build ResxTemplete Enum";
    /// <summary>
    /// 生成脚本编译资源枚举
    /// </summary>
    [MenuItem(mcDevMenuRoot + mcBuildResxTempleteEnum, false, mcPriority)]
    [MenuItem(mcDevAssetMenu + mcBuildResxTempleteEnum, false, mcPriority)]
    [MenuItem(mcDevHierarchy + mcBuildResxTempleteEnum, false, mcPriority)]
    static void ESF_MenuItem_BuildResxTempleteEnum()
    {
        ESF_Logic.BuildScriptCompilerResxTempleteEnum();
    }
    #endregion

    #region CopyToX
    const string mcCopyToX = "CopyToX";
    /// <summary>
    /// CopyToX
    /// </summary>
    [MenuItem(mcDevMenuRoot + mcCopyToX, false, mcPriority)]
    [MenuItem(mcDevAssetMenu + mcCopyToX, false, mcPriority)]
    [MenuItem(mcDevHierarchy + mcCopyToX, false, mcPriority)]
    static void ESF_MenuItem_CopyToX()
    {
        ESF_Logic.BuildCopyToX();
    }
    #endregion

    #region ExtractEditorCodeTo
    const string mcExtractEditorCodeTo = "Extract Editor Code";
    /// <summary>
    /// Extract Editor Code
    /// </summary>
    [MenuItem(mcDevMenuRoot + mcExtractEditorCodeTo, false, mcPriority)]
    [MenuItem(mcDevAssetMenu + mcExtractEditorCodeTo, false, mcPriority)]
    [MenuItem(mcDevHierarchy + mcExtractEditorCodeTo, false, mcPriority)]
    static void ESF_MenuItem_ExtractEditorCode()
    {
        EditorWindow_ExtractCode window = EditorWindow.GetWindow<EditorWindow_ExtractCode>(mcExtractEditorCodeTo);
        window.Show();
    }
    #endregion
}
#endif


